package server;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

public class TestBind {

	public static void main(String[] args) throws IOException {
		ServerSocket st = new ServerSocket(6666);
		System.out.println(st);
		while (true) {
			Socket s = st.accept();
			System.out.println(s.getInetAddress() + ",local:"
					+ s.getLocalPort() + ",port:" + s.getPort());
			//
			s.close();
		}
		// st.close();
	}

}
